package com.lichuang.dedao.curriculum.service;

import com.lichuang.dedao.curriculum.entity.CurriculumAudition;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 试听 服务类
 * </p>
 *
 * @author xiaosong
 * @since 2019-07-22
 */
public interface ICurriculumAuditionService extends IService<CurriculumAudition> {

    /**
     * 添加试听的课程
     * @param curriculumAudition
     * @return
     */
    Integer insertCurriculumAudition(CurriculumAudition curriculumAudition,String localToken);


    /**
     * 通过用户去找试听过得课程节
     * @param loginToken
     * @return
     */
    List<CurriculumAudition> getAllAuditionByUserId(String loginToken);

    /**
     * 获取试听数量通过用户课程id课程节
     * @param loginToken
     * @param curriculumId
     * @param auditionSectionId
     * @return
     */
    Integer getCountByUserIdAndCurriculum(String loginToken,Integer curriculumId,Integer auditionSectionId);
}
